let fs = require('fs');
let path = require('path');


// let url = path.resolve(__dirname,'1.txt');

// 同步判断- 文件或目录是否存在
// 返回一个布尔值
// let bool = fs.existsSync(url);

// console.log(bool);//true


// let url = path.resolve(__dirname,'1111.txt');
// let bool = fs.existsSync(url);

// console.log(bool);//false


// let url = path.resolve(__dirname,'../1.js');
// let bool = fs.existsSync(url);

// console.log(bool);//true


// 验证文件夹是否存在
let url = path.resolve(__dirname,'../../视频');
let bool = fs.existsSync(url);

console.log(bool);//true